From 90e61a5aa9cec7117f499e61b757dd288a54ad89 Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Tue, 9 Nov 2004 11:57:13 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.396 (4190b0993dyih2jcsaNFCf8mqgG-bw) Pass domain to update_dom_time instead of shared_info. --- xen/arch/x86/domain.c | 2 +- xen/arch/x86/time.c | 5 +++-- xen/common/domain.c | 2 +- xen/common/schedule.c | 8 ++++---- xen/include/xen/time.h | 4 +++- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index e95fc73be2..331a1bd4ce 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -828,7 +828,7 @@ int construct_dom0(struct domain *p, } /* Set up shared-info area. */ - update_dom_time(p->shared_info); + update_dom_time(p); p->shared_info->domain_time = 0; /* Mask all upcalls... */ for ( i = 0; i < MAX_VIRT_CPUS; i++ ) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 06eed7c440..7ee85cc22a 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -274,8 +274,9 @@ s_time_t get_s_time(void) } -void update_dom_time(shared_info_t *si) +void update_dom_time(struct domain *d) { + shared_info_t *si = d->shared_info; unsigned long flags; read_lock_irqsave(&time_lock, flags); @@ -318,7 +319,7 @@ void do_settime(unsigned long secs, unsigned long usecs, u64 system_time_base) write_unlock_irq(&time_lock); - update_dom_time(current->domain->shared_info); + update_dom_time(current->domain); } diff --git a/xen/common/domain.c b/xen/common/domain.c index 102afeff64..28eb98bedd 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -278,7 +278,7 @@ int final_setup_guestos(struct domain *p, dom0_builddomain_t *builddomain) goto out; /* Set up the shared info structure. */ - update_dom_time(p->shared_info); + update_dom_time(p); set_bit(DF_CONSTRUCTED, &p->d_flags); diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 22b97b6ef8..96476a6ce4 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -390,7 +390,7 @@ void __enter_scheduler(void) /* Ensure that the domain has an up-to-date time base. */ if ( !is_idle_task(next->domain) ) - update_dom_time(next->domain->shared_info); + update_dom_time(next->domain); if ( unlikely(prev == next) ) return; @@ -468,7 +468,7 @@ static void t_timer_fn(unsigned long unused) TRACE_0D(TRC_SCHED_T_TIMER_FN); if ( !is_idle_task(p->domain) ) { - update_dom_time(p->domain->shared_info); + update_dom_time(p->domain); send_guest_virq(p, VIRQ_TIMER); } @@ -482,7 +482,7 @@ static void dom_timer_fn(unsigned long data) struct domain *p = (struct domain *)data; struct exec_domain *ed = p->exec_domain[0]; TRACE_0D(TRC_SCHED_DOM_TIMER_FN); - update_dom_time(p->shared_info); + update_dom_time(p); send_guest_virq(ed, VIRQ_TIMER); } @@ -496,7 +496,7 @@ static void fallback_timer_fn(unsigned long unused) TRACE_0D(TRC_SCHED_FALLBACK_TIMER_FN); if ( !is_idle_task(p) ) - update_dom_time(p->shared_info); + update_dom_time(p); fallback_timer[ed->processor].expires = NOW() + MILLISECS(500); add_ac_timer(&fallback_timer[ed->processor]); diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h index dd476f9298..3c6d57a87b 100644 --- a/xen/include/xen/time.h +++ b/xen/include/xen/time.h @@ -34,6 +34,8 @@ extern int init_xen_time(); extern unsigned long cpu_khz; +struct domain; + /* * System Time * 64 bit value containing the nanoseconds elapsed since boot time. @@ -52,7 +54,7 @@ s_time_t get_s_time(void); #define MILLISECS(_ms) (((s_time_t)(_ms)) * 1000000ULL ) #define MICROSECS(_us) (((s_time_t)(_us)) * 1000ULL ) -extern void update_dom_time(shared_info_t *si); +extern void update_dom_time(struct domain *d); extern void do_settime(unsigned long secs, unsigned long usecs, u64 system_time_base); -- 2.30.2